
<div class="col-md-3 side-bar">
    @if (\App\Models\Topic::translate_draft_count() > 0)
        <div class="text-center alert alert-warning">
            <a href="{{ route('admin-translate.drafts') }}" style="color:inherit;"><i class="fa fa-file-text-o"></i> 草稿 {{ \App\Models\Topic::translate_draft_count() }} 篇</a>
        </div>
    @endif
    <div class="panel panel-default corner-radius" style="color:#a5a5a5">
        <div class="panel-body text-center">
            <a class="btn btn-warning no-pjax action-btn"
               href="{{ URL::route('admin-translate.create', ['category_id' => config('phphub.translate_id')]) }}"
               style="cursor:pointer;">
                <i class="fa fa-thumbs-up" aria-hidden="true"></i> 添加翻译
            </a>
        </div>
    </div>

    @if (Route::currentRouteName() == 'topics.index')
        @include('layouts.partials._resources_panel')
    @endif

    @if (isset($active_users) && count($active_users))
        <div class="panel panel-default corner-radius panel-active-users">
            <div class="panel-heading text-center">
                <h3 class="panel-title">{{ lang('Active Users') }}（<a href="{{ route('hall_of_fames') }}"><i
                                class="fa fa-star" aria-hidden="true"></i> {{ lang('Hall of Fame') }}</a>）</h3>
            </div>
            <div class="panel-body">
                @include('topics.partials.active_users')
            </div>
        </div>
    @endif

    @if (isset($hot_topics) && count($hot_topics) && !(isset($category) && $category->id == config('phphub.jobs_id')))
        <div class="panel panel-default corner-radius panel-hot-topics">
            <div class="panel-heading text-center">
                <h3 class="panel-title">{{ isset($category) ? $category->name : '' }}七天内最热</h3>
            </div>
            <div class="panel-body">
                @include('layouts.partials.sidebar_topics', ['sidebarTopics' => $hot_topics, 'numbered' => true])
            </div>
        </div>
    @endif

    @if(isset($banners['jobs-top']))
        <div class="panel panel-default corner-radius sidebar-resources">
            <div class="panel-heading text-center">
                <h3 class="panel-title">{{ lang('Recommend Jobs') }}</h3>
            </div>
            <div class="panel-body">
                <ul class="list list-group " style="text-align: center">
                    @foreach($banners['jobs-top'] as $banner)
                        <li class="list-group-item ">
                            <a href="{{ $banner->link }}" class="no-pjax" title="{{{ $banner->title }}}">
                                {{{ $banner->title }}}
                            </a>
                        </li>
                    @endforeach
                </ul>
            </div>
        </div>
    @endif

    @if(isset($banners['sidebar-sponsor']) && !(isset($category) && $category->id == config('phphub.jobs_id')))
        <div class="panel panel-default corner-radius">
            <div class="panel-body text-center sidebar-sponsor-box">
                @foreach($banners['sidebar-sponsor'] as $banner)
                    <a class="sidebar-sponsor-link" href="{{ $banner->link }}" target="_blank">
                        <img src="{{ $banner->image_url }}" class="popover-with-html"
                             data-content="{{ $banner->title }}" width="100%">
                    </a>
                    <hr>
                @endforeach
            </div>
        </div>
    @endif

    @if (Route::currentRouteName() == 'topics.index')
        @include('layouts.partials._brother_communities_panel')

        @if (isset($links) && count($links))
            <div class="panel panel-default corner-radius">
                <div class="panel-heading text-center">
                    <h3 class="panel-title">{{ lang('Links') }}</h3>
                </div>
                <div class="panel-body text-center" style="padding-top: 5px;">
                    @foreach ($links as $link)
                        <a href="{{ $link->link }}" target="_blank" rel="nofollow" title="{{ $link->title }}"
                           style="padding: 3px;">
                            <img src="{{ $link->cover }}" style="width:150px; margin: 3px 0;">
                        </a>
                    @endforeach
                </div>
            </div>
        @endif
    @endif

    <div id="sticker">
        <div class="panel panel-default corner-radius" style="color:#a5a5a5">
            <div class="panel-body text-center">
                <a href="{{ Auth::check() ? url('/messages/to/1') : 'mailto:810454300@qq.com'}}" style="color:#a5a5a5">
          <span style="margin-top: 7px;display: inline-block;">
              <i class="fa fa-heart" aria-hidden="true" style="color: rgba(232, 146, 136, 0.89);"></i> 建议反馈？请私信站长
          </span>
                </a>
            </div>
        </div>
    </div>
</div>
<div class="clearfix"></div>

